package com.itheima.jobs;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.service.OrderSettingService;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 定时清理预约设置
 */
public class ClearDataJob {
    @Reference
    private OrderSettingService orderSettingService;
    //清理预约设置
    public void delete(){
        System.out.println("定时清理预约设置");
        String date = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
        System.out.println(date);
        orderSettingService.delete(date);

    }

}

